package com.hlbspringcloud.usercenter.service.user;

import com.hlbspringcloud.usercenter.dao.user.UserMapper;
import com.hlbspringcloud.usercenter.domain.entity.user.User;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: user业务逻辑
 * @PROJECT_NAME: spring-cloud-alibaba
 * @CLASS_NAME:
 * @Author: huanglibin
 * @Date: 2020-05-24 2:30
 * @Version: 1.0
 */
@Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class UserService {

    private final UserMapper userMapper;

    public User findById(Integer id){
        //select * from user where id = #{id}
        return this.userMapper.selectByPrimaryKey(id);
    }
}
